﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Benefit.Service.Day
{
    /// <summary>
    /// 操作员罚款
    /// </summary>
    public class ServiceOperatorPublish : Benefit.Interface.Day.IOperatorPublish
    {
        Benefit.DB.DBManager db = null;
        public ServiceOperatorPublish(Benefit.DB.DBManager db)
        {
            this.db = db;
        }

        public Models.Day.OperatorPublish GetOperatorPublish(int tradeHistoryId, int operatorid)
        {
            Models.Day.OperatorPublish publish = new Models.Day.OperatorPublish();
            var query = db.OperatorPublish.Where(a => a.OperatorId == operatorid).Where(a => a.TradeHistoryId == tradeHistoryId);
            if (query.Count() > 0)
            {
                publish = query.First();
            }
            return publish;
        }



        public void InitPublish()
        {

        }
    }
}